﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="NewsTypeEdit.ascx.cs" Inherits="ExaminationSys.View.News.NewsTypeEdit" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script type="text/javascript" language="javascript">
    var setID = function (param) {
        var hidden = document.getElementById('<%=TypeIDHidden.ClientID %>');
        hidden.value = param;
    };
</script>
<input type="hidden" id="TypeIDHidden" runat="server" />
<ext:Window 
    ID="NewsTypeEditWindow" 
    runat="server" 
    Icon="Group" 
    Title="公共信息类别编辑"
    Width="400" 
    Height="205" 
    AutoShow="false" 
    Modal="true" 
    Hidden="true"
    Layout="Fit">
    <Items>       
                <ext:FormPanel 
                    ID="NewsTypeEditPanel" 
                    runat="server" 
                    Icon="ChartOrganisation"
                    DefaultAnchor="95%"
                    Padding="5"
                    BodyPadding="10">
                    <Items>
                        <ext:TextField ID="NewsTypeName" Name="NewsTypeName" AllowBlank="false" runat="server" FieldLabel="名称" />    
                        <ext:Checkbox ID="Status" Checked="true" runat="server" FieldLabel="是否启用"></ext:Checkbox>               
                        <ext:TextArea ID="NewsTypeDesctiption" runat="server" FieldLabel="描述" />                      
                    </Items>
                </ext:FormPanel>
    </Items>
    <Buttons>
        <ext:Button ID="SaveButton" runat="server" Text="保存" Icon="BulletGo">
            <DirectEvents>
                <Click OnEvent="SaveNewsType" Failure="Ext.MessageBox.alert('Saving failed', 'Error during ajax event');">
                </Click>
            </DirectEvents>
            
        </ext:Button>
        <ext:Button ID="CancelButton" runat="server" Text="取消" Icon="Cancel">
            <Listeners>
                 <Click Handler="#{NewsTypeEditWindow}.hide(null);" />
            </Listeners>
        </ext:Button>
    </Buttons>
</ext:Window>